var util = require('../../../utils/util.js');
var ajax = require('../../../utils/ajax.js');
var common = require('../../../utils/common.js');
var PageBase = require('../../../common/PageBase.js');
var app = getApp();

Page(common.extendPage(PageBase, {
    data: {
      isStaffLogin: false
    },

    onLoad(){

      common.initApp({
        loginSuc: () => {

          var eid = app.getEmployeeid();
          this.setData({
            isStaffLogin: !!eid
          })

        }
      });

    },

    _logout(){
      wx.removeStorageSync('eid');
      wx.removeStorageSync('eSid');
      wx.switchTab({
        url: '/pages/my/index/index'
      });
    },

    onShow() {}
}));